using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using Edge.Business.Domain.Application;
using Edge.Common.ComponentModel.Notification;
using Edge.Common.Services;
using Edge.Common.Utils;

namespace Edge.WebCode
{
    public class BasePage :Page
    {
        public const string AUTO_LOGOUT = "AutoLogout_KEY";
        public const string LAST_ACTIVE = "LastActiveDate_KEY";
        public const string LAST_USERNAME = "LastUsername_KEY";
        
        protected override void OnInit(EventArgs e)
		{

			string AutoLogin = System.Configuration.ConfigurationManager.AppSettings["AutoLogin"];
            HttpContext.Current.Response.Charset = "utf-8";
//			if (Locator.GetService<IContextObjects>().Get<UserHolder>() == null && !StringUtils.IsEmptyOrNull(AutoLogin))
//			{
//				User cc = Locator.GetService<IUserManager>().Load(Convert.ToInt32(AutoLogin));
//				Locator.GetService<IContextObjects>().Set<UserHolder>(new UserHolder(cc));
//                Locator.GetService<IContextObjects>().Set<PersonHolder>(new PersonHolder(CollectionsUtils.GetElement(cc.Persons, 0)));
//			}
            base.OnInit(e);
		}

    }
}
